<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>添加商品</title>
	<meta charset="UTF-8"/>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/font-awesome.min.css">
</head>
<body>
	<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top">
		<!-- logo位 -->
		<a class="navbar-brand" href="#">
			<img src="/img/logo.png" height="30" class="d-inline-block align-top" alt="">
			Mall电商运营平台
		</a>
		<!-- 导航位 -->
		<ul class="navbar-nav mr-auto">
			<li class="nav-item">
				<a class="nav-link" href="/product/DataView">数据看板</a>
			</li>
			<li class="nav-item">
				<a class="nav-link active" href="/product/List">商品维护</a>
			</li>
			
			<li class="nav-item">
				<a class="nav-link" href="/user/List">会员管理</a>
			</li>
		</ul>
		<!-- 个人中心 -->
		<span class="navbar-text"><a class="nav-link " href="#" th:href="@{/adminInfo(name=${userName})}"><i class="fa fa-user"></i>个人中心[<span th:text="${userName}"></span>]</a></span>
	</nav>
    <div class="container-fluid" style="margin-top: 100px;">
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <form action="/product/addProduct" method="post" enctype="multipart/form-data">
                    <table class="text-center table table-bordered" align="center" width="100%">
                        <tr  class="bg-light text-black-50">
                            <th colspan="2" ><h3>商品入库</h3></th>
                        </tr>
                        <tr>
                            <td style="width: 150px;">名称：</td>
                            <td><input class="form-control" placeholder="商品名称" type="text" name="productName"></td>
                        </tr>
                        <tr>
                            <td>单价：</td>
                            <td><input class="form-control" placeholder="单价" type="number" name="price"></td>
                        </tr>
                        <tr>
                            <td>库存：</td>
                            <td><input class="form-control" placeholder="库存" type="number" name="stock"></td>
                        </tr>
                        <tr>
                            <td>商品图片：</td>
                            <td>
								<div class="custom-file">
								    <input type="file" name="imageUrl" class="custom-file-input" id="customFile">
								    <label class="custom-file-label" for="customFile">选择文件</label>
								  </div>
							</td>
                        </tr>
						<tr>
						    <td>详情：</td>
						    <td><textarea class="form-control" rows="5" placeholder="商品描述..." name="description"></textarea></td>
						</tr>
                        <tr>
                            <td><input class="btn btn-outline-warning" style="width: 100px" onclick="history.go(-1)" value="取消"></td>
                            <td><input class="btn btn-success" style="width: 200px" type="submit" value="添加"></td>
                            <td><input class="btn btn-outline-warning" type="reset" value="清空"></td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="col-md-3"></div>
        </div>
    </div>
</body>
</html>
